﻿@model ArbabTravelsERP.Models.SearchModel
@{
    ViewBag.Title = "PortalSearch";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<script src="~/js/multi_select/jquery.multiple.select.js"></script>
<link href="~/js/multi_select/multiple-select.css" rel="stylesheet" />

@*Number event*@
<script type="text/javascript">
    function isNumberKey(evt) {

        var charCode = (evt.which) ? evt.which : event.keyCode

        if (charCode > 31 && (charCode < 48 || charCode > 57))

            return false;

        return true;

    }
</script>
<script type="text/javascript">
    $(document).ready(function () {
        $("#GetResume").click(function () {
            
            var edu_id = $("#EDUCATION_TYPE_ID").multipleSelect("getSelects");
            $("#MUL_EDUCATION_TYPE_ID").val(edu_id);

            var special_id = $("#SPECIALIZATION_TYPE_ID").multipleSelect("getSelects");
            $("#MUL_SPECIALIZATION_TYPE_ID").val(special_id);

            var edu_id = $("#STATE_CODE").multipleSelect("getSelects");
            $("#MUL_STATE_CODE").val(edu_id);

            var special_id = $("#CITY_CODE").multipleSelect("getSelects");
            $("#MUL_CITY_CODE").val(special_id);

            var edu_id = $("#INDUSTRY_ID").multipleSelect("getSelects");
            $("#MUL_INDUSTRY_ID").val(edu_id);

            var special_id = $("#DESIGNATION_ID").multipleSelect("getSelects");
            $("#MUL_DESIGNATION_ID").val(special_id);

            var special_id = $("#LANGUAGE_ID").multipleSelect("getSelects");
            $("#MUL_LANGUAGE_ID").val(special_id);

        });
    });
</script>

        <script type="text/javascript">
            $(document).ready(function () {
                $("#EDUCATION_TYPE_ID").multipleSelect({ filter: true, multiple: true, multipleWidth: 288 });
                $("#EDUCATION_TYPE_ID").multipleSelect("uncheckAll");

                $("#SPECIALIZATION_TYPE_ID").multipleSelect({ filter: true, multiple: true, multipleWidth: 288 });
                $("#SPECIALIZATION_TYPE_ID").multipleSelect("uncheckAll");

                $("#STATE_CODE").multipleSelect({ filter: true, multiple: true, multipleWidth: 288 });
                $("#STATE_CODE").multipleSelect("uncheckAll");

                $("#CITY_CODE").multipleSelect({ filter: true, multiple: true, multipleWidth: 288 });
                $("#CITY_CODE").multipleSelect("uncheckAll");

                $("#INDUSTRY_ID").multipleSelect({ filter: true, multiple: true, multipleWidth: 288 });
                $("#INDUSTRY_ID").multipleSelect("uncheckAll");

                $("#DESIGNATION_ID").multipleSelect({ filter: true, multiple: true, multipleWidth: 288 });
                $("#DESIGNATION_ID").multipleSelect("uncheckAll");

                $("#LANGUAGE_ID").multipleSelect({ filter: true, multiple: true, multipleWidth: 288 });
                $("#LANGUAGE_ID").multipleSelect("uncheckAll");

            });
</script>
@using (Html.BeginForm("PortalSearch", "Search", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @id = "formControl", @class = "form-horizontal", enctype = "multipart/form-data" }))
{
    @Html.AntiForgeryToken()

    <div class="right_col" role="main">
        <form id="portalSearch" data-parsley-validate class="form-horizontal form-label-left">
            <div class="">
                <div class="page-title">
                    <div class="title_left">
                        <h3>Power Search</h3>
                    </div>
                    @*<button type="button" class="col-md-2 btn  btn-primary pull-right">Get Resume</button>*@
                    <input type="submit" id="GetResume" value="Get Resume" class="col-md-2 btn  btn-primary pull-right" />
                </div>
                <div class="clearfix"></div>

                <div class="row">
                    <div class="col-md-12 col-sm-12 col-xs-12">
                        <div class="x_panel">
                            <div class="x_content">
                                <!-- Tabs -->
                                <br />
                                <div class="form-group">
                                    <div class="col-md-3 col-sm-3">
                                        @Html.TextBoxFor(model => model.ANY, new { @id = "ANY", @placeholder = "Any", @class = "form-control", @autocomplete = "off", @maxlength = "20" })
                                    </div>
                                    <div class="col-md-3 col-sm-3">
                                        @Html.TextBoxFor(model => model.ALL, new { @id = "ALL", @placeholder = "All", @class = "form-control", @autocomplete = "off", @maxlength = "20" })
                                    </div>
                                    <div class="col-md-3 col-sm-3">
                                        @Html.TextBoxFor(model => model.EXCLUDING, new { @id = "EXCLUDING", @placeholder = "Excluding", @class = "form-control", @autocomplete = "off", @maxlength = "20" })
                                    </div>
                                    <div class="col-md-3 col-sm-3">
                                        @{
    List<SelectListItem> listResumeFormat = new List<SelectListItem>();
    listResumeFormat.Add(new SelectListItem
    {
        Text = "Entire Resume",
        Value = "Entire_Resume"
    });
    listResumeFormat.Add(new SelectListItem
    {
        Text = "Press",
        Value = "Press"
    });
    listResumeFormat.Add(new SelectListItem
    {
        Text = "Internet",
        Value = "Internet"
    });
    listResumeFormat.Add(new SelectListItem
    {
        Text = "WordOfMouth",
        Value = "WordOfMouth"
    });
                                        }


                                        @Html.DropDownListFor(model => model.RESUME_FORMAT, listResumeFormat, "Select Resume Format", new { @id = "RESUME_FORMAT", @class = "form-control", @autocomplete = "off" })
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- Education -->
                    <div class="col-md-4 col-sm-4 col-xs-4">
                        <div class="x_panel">
                            <div class="x_title">
                                <h2>Education</h2>
                                <div class="clearfix"></div>
                            </div>
                            <div class="x_content">
                                <!-- Tabs -->
                                <br />
                                <div class="form-horizontal form-label-left">
                                    <div class="form-group">
                                        <label class="col-md-12 col-sm-12 col-xs-12">Degree</label>
                                        <div class="col-md-12 col-sm-12 col-xs-12">
                                            @Html.DropDownListFor(model => model.EDUCATION_TYPE_ID, ViewData["GetEducation"] as SelectList, new { @id = "EDUCATION_TYPE_ID", @autocomplete = "off", @style = "width: 288px;" })
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-md-12 col-sm-12 col-xs-12">Specialization</label>
                                        <div class="col-md-12 col-sm-12 col-xs-12">
                                            @Html.DropDownListFor(model => model.SPECIALIZATION_TYPE_ID, ViewData["GetSpecialization"] as SelectList, new { @id = "SPECIALIZATION_TYPE_ID", @autocomplete = "off", @style = "width: 288px;" })
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-md-12 col-sm-12 col-xs-12">Year of Passing</label>
                                        <div class="col-md-6 col-sm-6 col-xs-6">
                                            @Html.TextBoxFor(model => model.MIN_YEAR_OF_PASSING_EDU, new { @id = "MIN_YEAR_OF_PASSING_EDU", @placeholder = "Min Year", @onkeypress = "return isNumberKey(event)", @class = "form-control", @autocomplete = "off", @maxlength = "4" })
                                        </div>
                                        <div class="col-md-6 col-sm-6 col-xs-6">
                                            @Html.TextBoxFor(model => model.MAX_YEAR_OF_PASSING_EDU, new { @id = "MAX_YEAR_OF_PASSING_EDU", @placeholder = "Max Year", @class = "form-control", @autocomplete = "off", @onkeypress = "return isNumberKey(event)", @maxlength = "4" })
                                        </div>
                                    </div>

                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- End Education -->


                    <div class="col-md-4 col-sm-4 col-xs-4">
                        <!-- Experience -->
                        <div class="x_panel">
                            <div class="x_title">
                                <h2>Experience</h2>
                                <div class="clearfix"></div>
                            </div>
                            <div class="x_content">
                                <!-- Tabs -->
                                <br />
                                <div class="form-horizontal form-label-left">

                                    <div class="form-group">
                                        <div class="col-md-6 col-sm-6 col-xs-6">
                                            @Html.TextBoxFor(model => model.MIN_YEAR_OF_PASSING_EXP, new { @id = "MIN_YEAR_OF_PASSING_EXP", @placeholder = "Min Experience", @onkeypress = "return isNumberKey(event)", @class = "form-control", @autocomplete = "off", @maxlength = "4" })
                                        </div>
                                        <div class="col-md-6 col-sm-6 col-xs-6">
                                            @Html.TextBoxFor(model => model.MAX_YEAR_OF_PASSING_EXP, new { @id = "MAX_YEAR_OF_PASSING_EXP", @placeholder = "Max Experience", @class = "form-control", @onkeypress = "return isNumberKey(event)", @autocomplete = "off", @maxlength = "4" })
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-md-12 col-sm-12 col-xs-12">
                                            @Html.DropDownListFor(model => model.STATE_CODE, ViewData["GetCountryStateCity"] as SelectList, new { @id = "STATE_CODE", @autocomplete = "off", @style = "width: 288px;" })
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-md-12 col-sm-12 col-xs-12">
                                            @Html.DropDownListFor(model => model.CITY_CODE, ViewData["GetCountryStateCity"] as SelectList, new { @id = "CITY_CODE", @autocomplete = "off", @style = "width: 288px;" })
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--End Experiene-->

                    </div>

                    <div class="col-md-4 col-sm-4 col-xs-4">
                        <!-- Company -->
                        <div class="x_panel">
                            <div class="x_title">
                                <h2>Company</h2>
                                <div class="clearfix"></div>
                            </div>
                            <div class="x_content">
                                <!-- Tabs -->
                                <br />
                                <div class="form-horizontal form-label-left">
                                    <div class="form-group">
                                        <div class="col-md-12 col-sm-12 col-xs-12">
                                            @Html.DropDownListFor(model => model.INDUSTRY_ID, ViewData["GetIndustry"] as SelectList, new { @id = "INDUSTRY_ID", @autocomplete = "off", @style = "width: 288px;" })
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-md-12 col-sm-12 col-xs-12">
                                            @Html.DropDownListFor(model => model.DESIGNATION_ID, ViewData["GetDesignation"] as SelectList, new { @id = "DESIGNATION_ID", @autocomplete = "off", @style = "width: 288px;" })
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- End Company -->
                        <!-- Age Group -->
                        <div class="x_panel">
                            <div class="x_title">
                                <h2>Additional</h2>
                                <div class="clearfix"></div>
                            </div>
                            <div class="x_content content-wrap">
                                <!-- Tabs -->
                                <div class="form-horizontal form-label-left">

                                    <div class="form-group">
                                        <label class="col-md-12 col-sm-12 col-xs-12">Age Group</label>
                                        <div class="col-md-6 col-sm-6 col-xs-6">
                                            @Html.TextBoxFor(model => model.MIN_AGE, new { @id = "MIN_AGE", @placeholder = "Min Age", @onkeypress = "return isNumberKey(event)", @class = "form-control", @autocomplete = "off", @maxlength = "2" })
                                        </div>
                                        <div class="col-md-6 col-sm-6 col-xs-6">
                                            @Html.TextBoxFor(model => model.MAX_AGE, new { @id = "MAX_AGE", @placeholder = "Max Age", @onkeypress = "return isNumberKey(event)", @class = "form-control", @autocomplete = "off", @maxlength = "2" })
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-md-12 col-sm-12 col-xs-12">Select Language</label>
                                        <div class="col-md-6 col-sm-6 col-xs-6">
                                            @Html.DropDownListFor(model => model.LANGUAGE_ID, ViewData["GetLanguage"] as SelectList, new { @id = "LANGUAGE_ID", @autocomplete = "off", @style = "width: 288px;" })
                                        </div>
                                        <div class="col-md-6 col-sm-6 col-xs-6">
                                        </div>

                                    </div>
                                    <div class="form-group">
                                        <label class="col-md-6 col-sm-6 col-xs-6">Resume Viewed</label>
                                        <div class="col-md-6 col-sm-6 col-xs-6">
                                            @Html.CheckBoxFor(model => model.RESUME_NOT_VIEWED, new { @id = "RESUME_NOT_VIEWED", @class = "form-control", @autocomplete = "off" })
                                        </div>
                                        <div class="col-md-6 col-sm-6 col-xs-6">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- End Age Group -->
                        @Html.HiddenFor(model=>model.MUL_EDUCATION_TYPE_ID)
                        @Html.HiddenFor(model => model.MUL_SPECIALIZATION_TYPE_ID)
                        @Html.HiddenFor(model => model.MUL_STATE_CODE)
                        @Html.HiddenFor(model => model.MUL_CITY_CODE)
                        @Html.HiddenFor(model => model.MUL_INDUSTRY_ID)
                        @Html.HiddenFor(model => model.MUL_DESIGNATION_ID)
                        @Html.HiddenFor(model => model.MUL_LANGUAGE_ID)
                    </div>

                </div>

            </div>
        </form>
    </div>

}

